package adv7;

public class MyThread1 extends Thread {
	public MyThread1(String n) {
		super(n);

	}

	@Override
	public void run() {

		for (int i = 1; i <= 20; i++) {
			System.out.println("线程" + super.getName() + "输出了" + i);
			try {
				super.sleep((long) (60 * Math.random()));
			} catch (InterruptedException e) {
				// TODO 自动生成的 catch 块
				e.printStackTrace();
			}
		}
	}
}
